import React from 'react'
import { STATELISTTYPE } from '../types/store.d'
import { ProductCard, Tag, Button } from 'react-vant';
import{useNavigate} from 'react-router-dom'

interface MYPROPS {
    dataScrop: STATELISTTYPE
}

export default function Item(props: MYPROPS) {
    const navigate = useNavigate()
    const {user,id,city,img,paig} = props.dataScrop

    const handleToDetile=()=>{
        navigate('/detile',{
            state:props.dataScrop
        })
    }

    return (
        <div>
            <ProductCard
            onClick={()=>handleToDetile()}
      num={paig}
      price="2.00"
      desc={city}
      title={user}
      thumb={img}
    />
        </div>
    )
}
